#@layout("商品列表")
#define main()
<body class="timo-layout-page">
    <div class="layui-card">
        <div class="layui-card-header timo-card-header">
            <span><i class="fa fa-bars"></i>商品列表</span>
            <i class="layui-icon layui-icon-refresh refresh-btn"></i>
        </div>
        <div class="layui-card-body">
            <div class="layui-row timo-card-screen">
                <div class="pull-left layui-form-pane timo-search-box">
                    <div class="layui-inline">
                        <label class="layui-form-label">商品名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="goods.goodsName" value="#(goods.goodsName ??)" placeholder="请输入商品名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn timo-search-btn">
                            <i class="fa fa-search"></i>
                        </button>
                    </div>
                </div>
                <div class="pull-right screen-btn-group">
                    <button class="layui-btn open-popup" data-title="添加商品" data-url="#(ctxAd)/goods/add"  data-size="560,457"><i class="fa fa-plus"></i> 添加</button>
                    <div class="btn-group">
                        <button class="layui-btn">操作<span class="caret"></span></button>
                        <dl class="layui-nav-child layui-anim layui-anim-upbit">
                            <dd><a class="ajax-status" href="#(ctxAd)/goods/status/1" >启用</a></dd>
                            <dd><a class="ajax-status" href="#(ctxAd)/goods/status/0" >禁用</a></dd>
                        </dl>
                    </div>
                </div>
            </div>
            <table class="layui-table timo-table">
                <thead>
                <tr>
                    <th class="timo-table-checkbox">
                        <label class="timo-checkbox"><input type="checkbox"><i class="layui-icon layui-icon-ok"></i></label>
                    </th>
                    <th>商品图片</th>
                    <th>商品名称</th>
                    <th>分类</th>
                    <th>市场价</th>
                    <th>积分价</th>
                    <th>销量</th>
                    <th>闯关规则</th>
                    <th>状态</th>
                    <th class="sortable" data-field="updateTime">更新时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                #for(item : page.list)
	                <tr >
	                    <td><label class="timo-checkbox"><input type="checkbox" value="#(item.id)"><i class="layui-icon layui-icon-ok"></i></label></td>
	                    <td><img alt="图像" src="#image(item.goodsImage)"></td>
	                    <td>#(item.goodsName)</td>
	                    <td>#(item.categoryName)</td>
	                    <td>#(item.mktPrice)</td>
                        <td>#(item.scorePrice)</td>
                        <td>#(item.monthSales)</td>
                        <td>#(item.ruleName)</td>
                        <td>#(joyDict.getDictLabel(item.status+'','status','未知'))</td>
	                    <td>#date(item.updateTime, "yyyy-MM-dd HH:mm:ss")</td>
                        <td>
                            <a class="open-popup popup-edit" data-title="编辑商品" data-url="#(ctxAd)/goods/edit?id=#(item.id)"  data-size="460,357" href="#">编辑</a>
                            <a class="ajax-get" data-msg="您是否确定删除" href="#(ctxAd)/goods/delete?ids=#(item.id)">删除</a>
                        </td>
	                </tr>
                #end
                </tbody>
            </table>
            <!-- page -->
            #include("../../common/page.html", url=pageUrl)
            <!-- page end -->
        </div>
    </div>
</body>
#end